import React from 'react';
import {
    DesktopOutlined,
    PieChartOutlined,
    FileOutlined,
    UserOutlined,
  } from '@ant-design/icons';
  // import Loadable from '@loadable/component'

// import Home from '../views/home/home'
const Home = React.lazy(() => import('../views/home/home'));

// import User from '../views/user/user'
const User = React.lazy(() => import('../views/user/user'));

// import ArticleList from '../views/article/list'
const ArticleList = React.lazy(() => import('../views/article/list'));

// import ArticleAdd from '../views/article/add'
const ArticleAdd = React.lazy(() => import('../views/article/add'));

// import ArticleAudit from '../views/article/audit'
const ArticleAudit = React.lazy(() => import('../views/article/audit'));

// import Mood from '../views/mood/mood'
const Mood = React.lazy(() => import('../views/mood/mood'));

// import Category from '../views/category/category'
const Category = React.lazy(() => import('../views/category/category'));

// import Role from '../views/rights/role'
const Role = React.lazy(() => import('../views/rights/role'));

// import Page from '../views/rights/page' 
const Page = React.lazy(() => import('../views/rights/page'));

// import CollectionList from '../views/collection/list'
const CollectionList = React.lazy(() => import('../views/collection/list'));

// import CollectionCategory from '../views/collection/category'
const CollectionCategory = React.lazy(() => import('../views/collection/category'));

// import Banner from '../views/Banner/Banner'
const Banner = React.lazy(() => import('../views/Banner/Banner'));

// import GuestbookList from '../views/guestbook/list';
const GuestbookList = React.lazy(() => import('../views/guestbook/list'));

// import GuestbookAudit from '../views/guestbook/audit';

 export const menu = [
    { label: '首页', key: '/home', icon: <PieChartOutlined />, component: Home },
    { label: '用户管理', key: '/user', icon: <DesktopOutlined />, component: User },
    { label: '权限管理', key: '/rights', icon: <UserOutlined />, children: [
        { label: '角色列表', key: '/rights/role', component: Role },
        { label: '页面列表', key: '/rights/page', component: Page },
      ] },
    { label: '文章管理', key: '/article', icon: <UserOutlined />, children: [
      { label: '文章列表', key: '/article/list', component: ArticleList },
      { label: '审核文章', key: '/article/audit', component: ArticleAudit },
      { label: '文章添加', key: '/article/add', component: ArticleAdd, disabled: 'true' },
      { label: '文章编辑', key: '/article/edit/:id', component: ArticleAdd, disabled: 'true' },
    ] },
    { label: '百宝箱', key: '/collection', icon: <UserOutlined />, children: [
      { label: '收藏列表', key: '/collection/list', component: CollectionList },
      { label: '分类管理', key: '/collection/caregory', component: CollectionCategory },
    ] },
    { label: '每日一语', key: '/mood/list', icon: <FileOutlined />, component: Mood },
    { label: '分类管理', key: '/category/list', icon: <FileOutlined />, component: Category },
    { label: '轮播图管理', key: '/banner', icon: <FileOutlined />, component: Banner },
    { label: '留言管理', key: '/guestbook', icon: <FileOutlined />, children: [
      { label: '留言列表', key: '/guestbook/list', component: GuestbookList },
      // { label: '审核列表', key: '/guestbook/audit', component: GuestbookAudit }
    ] },
  ];

  // export const menu = [
  //   { label: '首页', key: '/home', icon: <PieChartOutlined />, component: '../views/home/home' },
  //   { label: '用户管理', key: '/user', icon: <DesktopOutlined />, component: '../views/user/user' },
  //   { label: '权限管理', key: '/rights', icon: <UserOutlined />, children: [
  //       { label: '角色列表', key: '/rights/role', component: '../views/rights/role' },
  //       { label: '页面列表', key: '/rights/page', component: '../views/rights/page' },
  //     ] },
  //   { label: '文章管理', key: '/article', icon: <UserOutlined />, children: [
  //     { label: '文章列表', key: '/article/list', component: '../views/article/list' },
  //     { label: '审核文章', key: '/article/audit', component: '../views/article/audit' },
  //     { label: '文章添加', key: '/article/add', component: '../views/article/audit', disabled: 'true' },
  //     { label: '文章编辑', key: '/article/edit/:id', component: '../views/article/add', disabled: 'true' },
  //   ] },
  //   { label: '百宝箱', key: '/collection', icon: <UserOutlined />, children: [
  //     { label: '收藏列表', key: '/collection/list', component: '../views/collection/list' },
  //     { label: '分类管理', key: '/collection/caregory', component: 'CollectionCategory' },
  //   ] },
  //   { label: '每日一语', key: '/mood/list', icon: <FileOutlined />, component: 'CollectionCategory' },
  //   { label: '分类管理', key: '/category/list', icon: <FileOutlined />, component: 'CollectionCategory' },
  //   { label: '轮播图管理', key: '/banner', icon: <FileOutlined />, component: 'Banner' }
  // ];